package cn.home.sysmanagement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.home.sysmanagement.mapper.HomeMessagetypeMapper;
import cn.home.sysmanagement.domain.HomeMessagetype;
import cn.home.sysmanagement.service.IHomeMessagetypeService;

/**
 * 公告类型Service业务层处理
 * 
 * @author homedoctor
 * @date 2025-04-09
 */
@Service
public class HomeMessagetypeServiceImpl implements IHomeMessagetypeService 
{
    @Autowired
    private HomeMessagetypeMapper homeMessagetypeMapper;

    /**
     * 查询公告类型
     * 
     * @param id 公告类型主键
     * @return 公告类型
     */
    @Override
    public HomeMessagetype selectHomeMessagetypeById(Long id)
    {
        return homeMessagetypeMapper.selectHomeMessagetypeById(id);
    }

    /**
     * 查询公告类型列表
     * 
     * @param homeMessagetype 公告类型
     * @return 公告类型
     */
    @Override
    public List<HomeMessagetype> selectHomeMessagetypeList(HomeMessagetype homeMessagetype)
    {
        return homeMessagetypeMapper.selectHomeMessagetypeList(homeMessagetype);
    }

    /**
     * 新增公告类型
     * 
     * @param homeMessagetype 公告类型
     * @return 结果
     */
    @Override
    public int insertHomeMessagetype(HomeMessagetype homeMessagetype)
    {
        return homeMessagetypeMapper.insertHomeMessagetype(homeMessagetype);
    }

    /**
     * 修改公告类型
     * 
     * @param homeMessagetype 公告类型
     * @return 结果
     */
    @Override
    public int updateHomeMessagetype(HomeMessagetype homeMessagetype)
    {
        return homeMessagetypeMapper.updateHomeMessagetype(homeMessagetype);
    }

    /**
     * 批量删除公告类型
     * 
     * @param ids 需要删除的公告类型主键
     * @return 结果
     */
    @Override
    public int deleteHomeMessagetypeByIds(Long[] ids)
    {
        return homeMessagetypeMapper.deleteHomeMessagetypeByIds(ids);
    }

    /**
     * 删除公告类型信息
     * 
     * @param id 公告类型主键
     * @return 结果
     */
    @Override
    public int deleteHomeMessagetypeById(Long id)
    {
        return homeMessagetypeMapper.deleteHomeMessagetypeById(id);
    }
}
